<!-- Голосование: переменные

полный список через {{!dump *}} -->

{{:title}}
	{{!connect 'theme/form/common.css'}}
	{{!connect "theme/doctype/vote.css"}}
	<a href="{{/}}{{community.url}}/{{*post.oid}}{{?*post.go2comment}}?showcomments&parent_oid={{*post.go2comment}}&offset=1#comments{{/?}}" class="doctype-vote-link">{{*post.title}}</a>
{{/:title}}

{{:body}}
	<div class="content- typography doctype-vote-content">
		<p>{{*post.question}}</p>
		{{?*already_voted || !*can_vote}}
		<p>Проголосовал <strong>{{*post.overall_voters}}</strong> {{!splural *post.overall_voters "человек" "" "а" "" sep=" "}}.{{?*vote_closed}} Голосование закрыто.{{/?}}</p>
		{{/?}}
	</div>
	{{?*already_voted || !*can_vote || *vote_closed}}
		<div class="doctype-vote-answers">
		{{!for *post.answers do=@:answer as="answer"}}{{:answer}}
			<div class="answer-">
				<div class="bar-"><div class="barscale-" style="width: {{!eval (answer.voters * 100 / *post.max_voters) }}px;"></div></div>
				{{answer.text}} <span class="count-">— {{answer.voters}}</span>
			</div>
		{{/:answer}}
		</div>
		{{?*can_open}}
		<ul class="buttons-">
			<form action="{{*vote_url|safe}}" method="POST">
			<li class="neutral-"><span class="bg1-"><input type="submit" name="vote_open_button" value="Открыть" class="submit-" /></span></li>
			</form>
		</ul>
		{{/?}}
	{{?:!*vote_closed && *can_vote}}
		{{@:vote_form}}
	{{/?}}
{{/:body}}

{{:vote_form}}
<div class="doctype-vote-form"><div class="bg1-"><div class="bg2-"><div class="bg3-">
	<p class="subtitle-">А как думаете вы?</p>
	<form action="{{*vote_url|safe}}" method="POST">
		<div class="vlist-">
		{{!for *post.answers as='variant' do=@:answer_form}}{{:answer_form}}
			<fieldset class="vitem-"><input type="radio" value="{{variant.num}}" name="vote_variant" id="{{*post.oid}}-{{variant.num}}"/> <label for="{{*post.oid}}-{{variant.num}}">{{variant.text}}</label></fieldset>
		{{/:answer_form}}
		</div>
		<ul class="buttons-">
			<li class="accept-"><span class="bg1-"><input type="submit" name="vote_button" value="Голосовать" class="submit-" /></span></li>
			{{?*can_close}}
			<li class="neutral-"><span class="bg1-"><input type="submit" name="vote_close_button" value="Завершить" class="submit-" /></span></li>
			{{?:*can_open}}
			<li class="neutral-"><span class="bg1-"><input type="submit" name="vote_open_button" value="Открыть" class="submit-" /></span></li>
			{{/?}}
		</ul>
	</form>
</div></div></div></div>
{{/:vote_form}}
